﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace JustMetClient.Parts.MainParts
{
    public partial class MenuPart : UserControl
    {
        public delegate void ClickHandler(object sender, string menu);
        public ClickHandler MenuClick;
        public MenuPart()
        {
            InitializeComponent();
        }

        private void FunctionMenuControl_Load(object sender, EventArgs e)
        {
            
        }

        #region 功能图标点击事件
        private void UserInfo_Click(object sender, EventArgs e)
        {
            ClickFunction(sender, "UserInfo");
           
        }

        private void FileEncrypt_Click(object sender, EventArgs e)
        {
            ClickFunction(sender, "FileEncrypt");
        }

        private void CreatePwd_Click(object sender, EventArgs e)
        {
            ClickFunction(sender, "CreatePwd");
        }
        private void Update_Click(object sender, EventArgs e)
        {
            ClickFunction(sender, "Update");
        }
        private void LogInfo_Click(object sender, EventArgs e)
        {
            ClickFunction(sender, "LogInfo");
        }
        private void Setting_Click(object sender, EventArgs e)
        {
            ClickFunction(sender, "Setting");
        }

        private void ClipBoard_Click(object sender, EventArgs e)
        {
            ClickFunction(sender, "ClipBoard");
        }

        private void OtherFun_Click(object sender, EventArgs e)
        {
            ClickFunction(sender, "OtherFun");
        }

        #endregion

        private void ClickFunction(object sender, string menu)
        {
            MenuClick?.Invoke(sender, menu);
        }

       
    }
}
